package com.cainiao.stock.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@HeadRowHeight(value = 20)
@ColumnWidth(value = 20)
@ContentRowHeight(value = 15)
@ContentFontStyle(fontName = "Microsoft YaHei")
public class StockInfoExcelDTO implements Serializable {



    @ExcelProperty(value = "序号",index = 1)
    private Integer num;
    @ExcelProperty(value = "代码",index = 2)
    private String code;
    @ExcelProperty(value = "名称",index = 3)
    private String name;
    @ExcelProperty(value = "前收盘价",index = 4)
    private BigDecimal preClosePrice;
    /**
     * 交易金额
     */
    @ExcelProperty(value = "最新价格",index = 5)
    private Long tradeAmt;

    /**
     * 增长率
     */
    @ExcelProperty(value = "涨幅",index = 6)
    private BigDecimal increase;

    /**
     * 涨跌幅
     */
    @ExcelProperty(value = "涨跌",index = 7)
    private BigDecimal upDown;

    /**
     * 波动幅度
     */
    @ExcelProperty(value = "振幅",index = 8)
    private BigDecimal amplitude;

    /**
     * 交易量
     */
    @ExcelProperty(value = "成交数量",index = 9)
    private BigDecimal tradeVol;

    /**
     * 交易价格
     */
    @ExcelProperty(value = "交易金额",index = 10)
    private BigDecimal tradePrice;

    /**
     * 当前日期和时间，格式为 "yyyy/MM/dd HH:mm"
     */
    @ExcelProperty(value = "当前日期",index = 11)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime curDate;

}
